#define _CRT_SECURE_NO_WARNINGS 1
#include"String.h"
#include<iostream>
namespace bit {
	void TestString1()
	{
		string a("");
		string b("abcdefg");
		std::cout << a.size() << std::endl;
		std::cout << b.size() << std::endl;
	}

	void TestString2()
	{
		string a("");
		string b("abcdefg");
		std::cout << b[3] << std::endl;
		//string::iterator it = b.begin();
		//while (it != b.end())
		//{
		//	(*it)++;
		//	std::cout << *it << " ";
		//	it++;
		//}
		string::const_iterator it = b.begin();
		while (it != b.end())
		{
			//(*it)++;
			std::cout << *it << " ";
			it++;
		}
	}
	void TestString3()
	{
		string a("");
		string b("abcdefg");
		b.push_back('x');
		b.append("xxxx");
		b += 'z';
		b += "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz";
	}
	void TestString4()
	{
		string a("");
		string b("abcdefg");

		b.insert(3, 'x');
		b.erase(3, 3);
	}
	void TestString5()
	{
		string a("");
		string b("abcdefg");
		b.insert(0, 'x');
	}
}
int main()
{
	//bit::TestString1();
	//bit::TestString2();
	//bit::TestString3();
	//bit::TestString4();
	bit::TestString5();
	return 0;
}